\(\int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx\) [175]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 125 \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {5 x}{32 a^3}-\frac {1}{32 a^3 d (i-\cot (c+d x))}+\frac {i}{16 a^3 d (i+\cot (c+d x))^4}-\frac {1}{3 a^3 d (i+\cot (c+d x))^3}-\frac {23 i}{32 a^3 d (i+\cot (c+d x))^2}+\frac {13}{16 a^3 d (i+\cot (c+d x))} \]

[Out]

5/32*x/a^3-1/32/a^3/d/(I-cot(d*x+c))+1/16*I/a^3/d/(I+cot(d*x+c))^4-1/3/a^3/d/(I+cot(d*x+c))^3-23/32*I/a^3/d/(I
+cot(d*x+c))^2+13/16/a^3/d/(I+cot(d*x+c))

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3167, 862, 90, 209} \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=-\frac {1}{32 a^3 d (-\cot (c+d x)+i)}+\frac {13}{16 a^3 d (\cot (c+d x)+i)}-\frac {23 i}{32 a^3 d (\cot (c+d x)+i)^2}-\frac {1}{3 a^3 d (\cot (c+d x)+i)^3}+\frac {i}{16 a^3 d (\cot (c+d x)+i)^4}+\frac {5 x}{32 a^3} \]

[In]

Int[Cos[c + d*x]^5/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^3,x]

[Out]

(5*x)/(32*a^3) - 1/(32*a^3*d*(I - Cot[c + d*x])) + (I/16)/(a^3*d*(I + Cot[c + d*x])^4) - 1/(3*a^3*d*(I + Cot[c
 + d*x])^3) - ((23*I)/32)/(a^3*d*(I + Cot[c + d*x])^2) + 13/(16*a^3*d*(I + Cot[c + d*x]))

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 862

Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)
^(m + p)*(f + g*x)^n*(a/d + (c/e)*x)^p, x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && NeQ[e*f - d*g, 0] && EqQ[c
*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && EqQ[m + p, 0]))

Rule 3167

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[-d^(-1), Subst[Int[x^m*((b + a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {x^5}{(i a+a x)^3 \left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {\text {Subst}\left (\int \frac {x^5}{\left (-\frac {i}{a}+\frac {x}{a}\right )^2 (i a+a x)^5} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {1}{32 a^3 (-i+x)^2}+\frac {i}{4 a^3 (i+x)^5}-\frac {1}{a^3 (i+x)^4}-\frac {23 i}{16 a^3 (i+x)^3}+\frac {13}{16 a^3 (i+x)^2}+\frac {5}{32 a^3 \left (1+x^2\right )}\right ) \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {1}{32 a^3 d (i-\cot (c+d x))}+\frac {i}{16 a^3 d (i+\cot (c+d x))^4}-\frac {1}{3 a^3 d (i+\cot (c+d x))^3}-\frac {23 i}{32 a^3 d (i+\cot (c+d x))^2}+\frac {13}{16 a^3 d (i+\cot (c+d x))}-\frac {5 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{32 a^3 d} \\ & = \frac {5 x}{32 a^3}-\frac {1}{32 a^3 d (i-\cot (c+d x))}+\frac {i}{16 a^3 d (i+\cot (c+d x))^4}-\frac {1}{3 a^3 d (i+\cot (c+d x))^3}-\frac {23 i}{32 a^3 d (i+\cot (c+d x))^2}+\frac {13}{16 a^3 d (i+\cot (c+d x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.97 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.85 \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {120 c+120 d x+108 i \cos (2 (c+d x))+60 i \cos (4 (c+d x))+20 i \cos (6 (c+d x))+3 i \cos (8 (c+d x))+132 \sin (2 (c+d x))+60 \sin (4 (c+d x))+20 \sin (6 (c+d x))+3 \sin (8 (c+d x))}{768 a^3 d} \]

[In]

Integrate[Cos[c + d*x]^5/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^3,x]

[Out]

(120*c + 120*d*x + (108*I)*Cos[2*(c + d*x)] + (60*I)*Cos[4*(c + d*x)] + (20*I)*Cos[6*(c + d*x)] + (3*I)*Cos[8*
(c + d*x)] + 132*Sin[2*(c + d*x)] + 60*Sin[4*(c + d*x)] + 20*Sin[6*(c + d*x)] + 3*Sin[8*(c + d*x)])/(768*a^3*d
)

Maple [A] (verified)

Time = 0.96 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.78

method result size
risch \(\frac {5 x}{32 a^{3}}+\frac {5 i {\mathrm e}^{-4 i \left (d x +c \right )}}{64 d \,a^{3}}+\frac {5 i {\mathrm e}^{-6 i \left (d x +c \right )}}{192 d \,a^{3}}+\frac {i {\mathrm e}^{-8 i \left (d x +c \right )}}{256 d \,a^{3}}+\frac {9 i \cos \left (2 d x +2 c \right )}{64 d \,a^{3}}+\frac {11 \sin \left (2 d x +2 c \right )}{64 d \,a^{3}}\) \(97\)
derivativedivides \(\frac {\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{64}+\frac {1}{32 \tan \left (d x +c \right )+32 i}-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{64}+\frac {i}{16 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {3 i}{32 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {1}{8 \tan \left (d x +c \right )-8 i}}{d \,a^{3}}\) \(102\)
default \(\frac {\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{64}+\frac {1}{32 \tan \left (d x +c \right )+32 i}-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{64}+\frac {i}{16 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {3 i}{32 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {1}{8 \tan \left (d x +c \right )-8 i}}{d \,a^{3}}\) \(102\)

[In]

int(cos(d*x+c)^5/(cos(d*x+c)*a+I*a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

5/32*x/a^3+5/64*I/d/a^3*exp(-4*I*(d*x+c))+5/192*I/d/a^3*exp(-6*I*(d*x+c))+1/256*I/d/a^3*exp(-8*I*(d*x+c))+9/64
*I/d/a^3*cos(2*d*x+2*c)+11/64/d/a^3*sin(2*d*x+2*c)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.61 \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {{\left (120 \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 12 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 120 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 60 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 20 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{768 \, a^{3} d} \]

[In]

integrate(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/768*(120*d*x*e^(8*I*d*x + 8*I*c) - 12*I*e^(10*I*d*x + 10*I*c) + 120*I*e^(6*I*d*x + 6*I*c) + 60*I*e^(4*I*d*x
+ 4*I*c) + 20*I*e^(2*I*d*x + 2*I*c) + 3*I)*e^(-8*I*d*x - 8*I*c)/(a^3*d)

Sympy [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.79 \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\begin {cases} \frac {\left (- 100663296 i a^{12} d^{4} e^{22 i c} e^{2 i d x} + 1006632960 i a^{12} d^{4} e^{18 i c} e^{- 2 i d x} + 503316480 i a^{12} d^{4} e^{16 i c} e^{- 4 i d x} + 167772160 i a^{12} d^{4} e^{14 i c} e^{- 6 i d x} + 25165824 i a^{12} d^{4} e^{12 i c} e^{- 8 i d x}\right ) e^{- 20 i c}}{6442450944 a^{15} d^{5}} & \text {for}\: a^{15} d^{5} e^{20 i c} \neq 0 \\x \left (\frac {\left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 8 i c}}{32 a^{3}} - \frac {5}{32 a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {5 x}{32 a^{3}} \]

[In]

integrate(cos(d*x+c)**5/(a*cos(d*x+c)+I*a*sin(d*x+c))**3,x)

[Out]

Piecewise(((-100663296*I*a**12*d**4*exp(22*I*c)*exp(2*I*d*x) + 1006632960*I*a**12*d**4*exp(18*I*c)*exp(-2*I*d*
x) + 503316480*I*a**12*d**4*exp(16*I*c)*exp(-4*I*d*x) + 167772160*I*a**12*d**4*exp(14*I*c)*exp(-6*I*d*x) + 251
65824*I*a**12*d**4*exp(12*I*c)*exp(-8*I*d*x))*exp(-20*I*c)/(6442450944*a**15*d**5), Ne(a**15*d**5*exp(20*I*c),
 0)), (x*((exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I*c) + 10*exp(4*I*c) + 5*exp(2*I*c) + 1)*exp(-8*I*c)/(32*a**3
) - 5/(32*a**3)), True)) + 5*x/(32*a**3)

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negative exponent.

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.92 \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=-\frac {-\frac {60 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{3}} + \frac {60 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{3}} - \frac {12 \, {\left (5 \, \tan \left (d x + c\right ) + 7 i\right )}}{a^{3} {\left (i \, \tan \left (d x + c\right ) - 1\right )}} + \frac {-125 i \, \tan \left (d x + c\right )^{4} - 596 \, \tan \left (d x + c\right )^{3} + 1110 i \, \tan \left (d x + c\right )^{2} + 996 \, \tan \left (d x + c\right ) - 405 i}{a^{3} {\left (\tan \left (d x + c\right ) - i\right )}^{4}}}{768 \, d} \]

[In]

integrate(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/768*(-60*I*log(tan(d*x + c) + I)/a^3 + 60*I*log(tan(d*x + c) - I)/a^3 - 12*(5*tan(d*x + c) + 7*I)/(a^3*(I*t
an(d*x + c) - 1)) + (-125*I*tan(d*x + c)^4 - 596*tan(d*x + c)^3 + 1110*I*tan(d*x + c)^2 + 996*tan(d*x + c) - 4
05*I)/(a^3*(tan(d*x + c) - I)^4))/d

Mupad [B] (verification not implemented)

Time = 27.76 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.31 \[ \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx=\frac {5\,x}{32\,a^3}+\frac {-\frac {27\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{16}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,33{}\mathrm {i}}{8}+\frac {31\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{6}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,9{}\mathrm {i}}{8}+\frac {89\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{24}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,9{}\mathrm {i}}{8}+\frac {31\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,33{}\mathrm {i}}{8}-\frac {27\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}}{a^3\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^2\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^8} \]

[In]

int(cos(c + d*x)^5/(a*cos(c + d*x) + a*sin(c + d*x)*1i)^3,x)

[Out]

(5*x)/(32*a^3) + ((31*tan(c/2 + (d*x)/2)^3)/6 - (tan(c/2 + (d*x)/2)^2*33i)/8 - (27*tan(c/2 + (d*x)/2))/16 - (t
an(c/2 + (d*x)/2)^4*9i)/8 + (89*tan(c/2 + (d*x)/2)^5)/24 + (tan(c/2 + (d*x)/2)^6*9i)/8 + (31*tan(c/2 + (d*x)/2
)^7)/6 + (tan(c/2 + (d*x)/2)^8*33i)/8 - (27*tan(c/2 + (d*x)/2)^9)/16)/(a^3*d*(tan(c/2 + (d*x)/2) + 1i)^2*(tan(
c/2 + (d*x)/2)*1i + 1)^8)